#!/usr/bin/python
#-*- encoding:utf-8 -*-
class WebSiteType(type):
	def __init__(cls, name, bases, attrs):
		super(WebSiteType, cls).__init__( name, bases, attrs)
		if "home_url" not in attrs or \
			"login_url" not in attrs:
			raise TypeError("没有实现类属性home_url 或 login_url")
		else:
			if attrs["home_url"] and attrs["login_url"]:pass
			else:
				raise TypeError("home_url 或 login_url 为空")

__metaclass__ = WebSiteType

